<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../../../common/js/jquery-3.4.1.js" type="text/javascript"></script>
		<script type="text/javascript">
			$(function(){
				//将苹果替换成菠萝
				$("div.first").replaceWith("<div>菠萝</div>")
				//将菠萝替换成苹果
				 $("div.third").replaceWith("<div>苹果</div>")
				//将苹果替换成菠萝
			})
		</script>
	</head>
	<body>
		<h3>例子</h3>
		<div class="container">
		    <div class="first">苹果</div>
		    <div class="second">橘子</div>
		    <div class="third">菠萝</div>
		</div>
	</body>
</html>
